import { getRequest, postRequest } from "@/lib/axios";
import {
  MAINNET,
  COINS,
  TOKENS,
  WALLETSELECT,
  MARGIN,
  MARGINRECORD,
  WALLETTRANSACTIONS,
  WALLETBILLS,
  USDM,
} from "@/config/api-constant/ExAssistant";

//获取搜索下拉项配置
export const walletSelectApi = () => {
  return getRequest(WALLETSELECT, {});
};

// 获取主链管理（列表）
export const mainnetListApi = (param) => {
  return getRequest(MAINNET, param);
};

//添加（编辑）主链
export const mainnetEditApi = (param) => {
  return postRequest(MAINNET, param);
};

// 获取币种管理（列表）

export const coinsListApi = (param) => {
  return getRequest(COINS, param);
};
//添加（编辑）币种
export const coinsEditApi = (param) => {
  return postRequest(COINS, param);
};

// 获取Token管理（列表）

export const tokensListApi = (param) => {
  return getRequest(TOKENS, param);
};

//添加（编辑）Token
export const tokensEditApi = (param) => {
  return postRequest(TOKENS, param);
};

//获取账户管理
export const marginApi = (param, type) => {
  return getRequest(MARGIN, param, type);
};

//获取账户流水
export const marginRecordApi = (param, type) => {
  return postRequest(MARGINRECORD, param, type);
};

//获取链上充提订单
export const walletTransactionsApi = (param, type) => {
  return postRequest(WALLETTRANSACTIONS, param, type);
};

//获取账单管理
export const walletBillsApi = (param, type) => {
  return postRequest(WALLETBILLS, param, type);
};

//USDM管理
export const usdmListApi = (param, type) => {
  return getRequest(USDM, param, type);
};

//USDM订单审核
export const usdmEditApi = (param) => {
  return postRequest(USDM, param);
};
